<template>
    <div>

        <Unity :unity="unityContext" width="800px" height="600px"></Unity>

        <div>采用WASD键进行控制</div>
    </div>
</template>

<script>
    import Vue from 'vue'
    import UnityWebgl from 'unity-webgl'

    Vue.use(UnityWebgl)

    const Unity = new UnityWebgl({
        loaderUrl: 'build/webgl.loader.js',
        dataUrl: "build/webgl.data",
        frameworkUrl: "build/webgl.framework.js",
        codeUrl: "build/webgl.wasm"
    })

    export default {
        name: 'unityPage',
        component: {
            Unity: UnityWebgl.vueComponent
        },
        data() {
            return {
                unityContext: Unity
            }
        }
    }
</script>

<style scoped>

</style>